#ifndef LINECONNECTORELEMENT_H
#define LINECONNECTORELEMENT_H

#include <QObject>
#include <QGraphicsItem>
#include <QPointer>

#include "../sagevis.h"
#include "../VisBaseClasses/visbaseelement.h"
#include "../VisBaseClasses/visbasewidget.h"

#define CENTER_LINE_CONNECTION    0
#define TOP_RIGHT_LINE_CONNECTION   1
#define TOP_LEFT_LINE_CONNECTION    2
#define BOTTOM_RIGHT_LINE_CONNECTION   3
#define BOTTOM_LEFT_LINE_CONNECTION     4
#define CENTER_LEFT_LINE_CONNECTION     5
#define CENTER_RIGHT_LINE_CONNECTION    6
#define BOTTOM_CENTER_LINE_CONNECTION   7
#define TOP_CENTER_LINE_CONNECTION    8
#define ABSOLUTE_COORDINATE_LINE_CONNECTION 9
#define RELATIVE_COORDINATE_LINE_CONNECTION 10
#define DEFAULT_LINE_CONNECTION 11

class LineConnectorElement : public VisBaseElement
{
    Q_OBJECT
public:
    //LineConnectorElement(QPointer<SageVis> sageVisPointer, QPointer<VisBaseWidget> parentWidget, QGraphicsItem *parent = 0);
    LineConnectorElement(QPointer<VisBaseElement> e1, QPointer<VisBaseElement> e2, QPointer<SageVis> sageVisPointer, QPointer<VisBaseWidget> parentWidget, QGraphicsItem *parent = 0);
    LineConnectorElement(QPointer<VisBaseElement> e1, QPointer<VisBaseElement> e2, int type1, int type2, QPointer<SageVis> sageVisPointer, QPointer<VisBaseWidget> parentWidget, QGraphicsItem *parent = 0);

    typedef VisBaseElement super;

    //PAINT FUNCTIONS
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

    QString getUniqueId();

signals:
    
public slots:
    void updatedSlot();

protected:
    QPointer<VisBaseElement> elt1;
    QPointer<VisBaseElement> elt2;

    int elt1ConnectionType;
    int elt2ConnectionType;
    
};

#endif // LINECONNECTORELEMENT_H
